package com.xuecheng.controller;

import com.xuecheng.pojo.Student;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

//对controller接口信息描述
@Api(value ="Hello Controller",description = "hello controller 说明 des",tags = "hello controller 说明 tags")
public interface HelloControllerApi {
    /**
     * 测试 queryString 、Restful 和 json 格式的参数
     * put	http://ip:port/rootPath/stu/xxxx?name=xxx
     * requestBody：
     * {
     * "xxxxx"："xxxx"
     * }
     */
    @ApiOperation("修改学员信息" )  //对controller方法功能描述
    @ApiImplicitParams({ //对controller方法多个请求参数信息描述
            @ApiImplicitParam()//对controller方法一个请求参数信息描述
    })
    @PutMapping("{id}")
    Student mofidyStudentBynNum(@PathVariable("id") String id, @RequestParam("name") String name, @RequestBody Student student);
}
